import request from '@/utils/request'
// 获取组织架构数据
export const getdepartment = () => {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 获取管理员信息
export const getManangerInfo = () => {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}
// 新建部门
export const addDepartment = data => {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 删除部门
export const delDepartment = id => {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
// 编辑部门
export const editDepartment = id => {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
export const updateDepartment = data => {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
